package org.example.myleet.p437;

import org.example.myleet.Utils.Assert;
import org.example.myleet.Utils.Parser;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue(0 == solution.pathSum(Parser.parse(new Integer[]{}), 10));
        Assert.isTrue(0 == solution.pathSum(Parser.parse(new Integer[]{1,2}), 0));
        Assert.isTrue(0 == solution.pathSum(Parser.parse(new Integer[]{1}), 0));
        Assert.isTrue(1 == solution.pathSum(Parser.parse(new Integer[]{10}), 10));
        Assert.isTrue(0 == solution.pathSum(Parser.parse(new Integer[]{10}), 11));
        Assert.isTrue(3 == solution.pathSum(Parser.parse(new Integer[]{10,5,-3,3,2,null,11,3,-2,null,1}), 8));
        Assert.isTrue(0 == solution.pathSum(Parser.parse(new Integer[]{10,5,-3,3,2,null,11,3,-2,null,1}), 9));
        Assert.isTrue(3 == solution.pathSum(Parser.parse(new Integer[]{5,4,8,11,null,13,4,7,2,null,null,5,1}), 22));
        Assert.isTrue(1 == solution.pathSum(Parser.parse(new Integer[]{-2,null,-3}), -5));
        Assert.isTrue(2 == solution.pathSum(Parser.parse(new Integer[]{1,null,2,null,3,null,4,null,5}), 3));
        Assert.isTrue(1 == solution.pathSum(Parser.parse(new Integer[]{1,-2,-3}), -1));
        Assert.isTrue(1 == solution.pathSum(Parser.parse(new Integer[]{1,-2,-3,1,3,-2,null,-1}), 3));
    }
}
